package com.imooc.mall.service;

import com.github.pagehelper.PageInfo;
import com.imooc.mall.model.pojo.Product;
import com.imooc.mall.model.request.AddProductReq;
import com.imooc.mall.model.request.ProductListReq;
import org.springframework.http.HttpRequest;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.net.URI;

/**
 * 商品信息的service
 */
public interface ProduceService {

    void addProduct(AddProductReq addProductReq);

    void upload(HttpServletRequest httpServletRequest,
                @RequestParam("file") MultipartFile file);

    URI getHost(URI uri);


    void update(Product updateProduct);

    void deleteProductById(Integer id);

    void bathUpdateSellStatus(Integer[] ids,
                              Integer sellStatus);

    PageInfo listForAdmin(Integer pageNum, Integer pageSize);

    Product detail(Integer id);

    PageInfo list(ProductListReq productListReq);
}
